#$B%G!<%?%Y!<%9$GMQ0U$G$-$J$$$h$&$JJ8;z$NCV49(B

class TalkClass
	def command(str)
		source = str.scan(/<[a-zA-Z0-9]*>/)
		source.each{|command|
			temp = command.gsub("<",'').gsub(">",'')
			case temp
			when "NowTime"
				answer = Time.now.strftime("%H:%M:%S")
			when "Date"
				answer = Time.now.strftime("%Y/%m/%d")
			end
			str.sub!(command,answer) if(answer!=nil)
		}
		return str
	end
end
